Current approaches to interprocess communications between a client and a server typically involve a software endpoint associated with a connection, i.e., an Interprocess Communications Facility. The invention as described herein specifically identifies the use of sockets as the Interprocess Communications Facility. However, as will be readily appreciated by one of ordinary skill in the art, other Interprocess Communications Facilities may be readily substituted for the socket software endpoint as used herein. For example, the Interprocess Communications Facilities used to implement the invention may include stream sockets, datagram sockets, Berkeley Standard Distribution (BSD) sockets, UNIX-domain sockets, or Transport Layer Interface (TLI) connections. Further, as used herein and as will be readily understood by one of ordinary skill in the art, a “client” is a process or application that is configured to run from a host computer server. Thus, clients and servers open a socket or other comparable Interprocess Communications Facility through which communications may be made.
Typically, a socket forms a connection between a client and a server using connection oriented protocol (COP). Socket connections using connection oriented protocols have the disadvantage of poor performance because of the protocol overhead. Socket connections using connection oriented protocols are generally designed for clients on different systems to communicate with each other over a computer network. The associated protocol overhead increases the central processing unit cycles and computer memory required for every communicated data unit. An example of a typical connection oriented protocol is Transmission Control Protocol/Internet Protocol (TCP/IP).
The overhead associated with connection oriented protocol is necessary for applications run on a network to ensure the accurate transfer of data. However, connection oriented protocol is not necessary to ensure the accuracy of locally transferred data. As described herein, “local” or “on the same system” means that the client and server are both located on the same machine and are not connected by a network connection such that connection oriented protocol is not necessary for the accurate transfer of data.
In a typical local socket connection, the client writes data to a socket connection, and the socket connection copies the data into the server kernel. As will be readily understood by one of ordinary skill in the art, connection oriented protocols, such as TCP/IP, typically break the data into packets. The protocol allocates a buffer for the network header and check sums the data. Headers must be placed on each data packet, and each packet must be queued either onto the network device, or, if the connection is local, to “loopback software.” As will be readily understood by one of ordinary skill in the art, “loopback software” is a conventional software which mimics a network device for local data transfers. Thus, clients and servers may transfer data using the same process without regard to whether a connection is local or through a network. Each data packet is then processed, the network header is removed and the header and data sum are checked for accuracy. Then the protocol finds the socket, queues the data, and disconnects.
Connection oriented protocols have the advantage of working either through a network, or on the same system. However, connection oriented protocols have poor performance for data transfer because of the associated overhead discussed above. Furthermore, if a connection is local, the overhead is unnecessary.
One approach to provide higher performance connections for local data transfer is to set pointers directly between socket connections that do not use connection oriented protocol. UNIX-domain sockets are an example of such a configuration. UNIX-domain sockets move data directly between the client socket and the server socket without any protocol overhead. However, each client or application must be individually coded to use sockets so configured, and, as a practical matter, most applications have been coded to use connection oriented protocols over a computer network. In addition, sockets using such a configuration cannot be used over a computer network. Therefore, although UNIX-domain sockets provide significantly better performance for local data transfer when compared to typical connection oriented protocol sockets, unlike connection oriented protocol sockets, UNIX-domain sockets do not provide for data transfer for both local and remote clients.
Thus, it is noted that there is a need for increasing performance for local connections while still providing for network connections. In addition, any increases in performance for local connections should not require the re-coding of existing applications that are configured for connections using connection oriented protocol. These advantages and other advantages are provided by the system and method described herein, and numerous disadvantages of existing techniques are avoided.